﻿@model MMSWebsite.Models.EmployeeViewModel

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
}


<h2>Editing Employee <i>"@Model.Employee.Name" with EmpCode = @Model.Employee.Code</i></h2>
@if (Model.Employee.IsLocked == false)
{
    using (Html.BeginForm())
     {
         @Html.ValidationSummary(true)
         @Html.HiddenFor(model => model.Employee.Id)
         Html.RenderPartial("EmployeePartial", Model);
     }
}
else  
{
    @: This Employee is locked, if you are Admin, click this link to @Html.ActionLink("Unlock this account", "TriggerLock", new {id = Model.Employee.Id})
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
